<template>
  <div class="head-container">
    <!-- 搜索 -->
    <el-input v-model="query.value" clearable placeholder="输入查询语句" style="width: 400px;" class="filter-item" @keyup.enter.native="toQuery" />
    <el-button class="filter-item" size="mini" type="success" icon="el-icon-search" @click="toQuery">搜索</el-button>
  </div>
</template>
<script>
export default {
  props: {
    query: {
      type: Object,
      required: true
    },
    dicts: {
      type: Array,
      required: true
    }
  },
  data() {
    return {
      enabledTypeOptions: [
        { key: '0', display_name: '正常' },
        { key: '1', display_name: '停用' }
      ]
    }
  },
  methods: {
    add() {
      this.$refs.form.dialog = true
    },
    toQuery() {
      this.$parent.page = 1
      this.$parent.init()
    }
  }
}
</script>
